package com.itcat.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itcat.api.mysql.PmsProductAttributeApi;
import com.itcat.common.CommonPage;
import com.itcat.mysql.param.PageParam;
import com.itcat.mysql.pojo.PmsProductAttribute;
import com.itcat.service.PmsProductAttributeService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
* @author 小心触碰的电脑
* @description 针对表【pms_product_attribute(商品属性参数表)】的数据库操作Service实现
* @createDate 2022-04-03 00:55:24
*/
@Service
public class PmsProductAttributeServiceImpl implements PmsProductAttributeService{

    @DubboReference
    private PmsProductAttributeApi pmsProductAttributeApi;


    @Override
    public CommonPage<PmsProductAttribute> list(Integer cid, PageParam pageParam, Integer type) {
        Page<PmsProductAttribute> page = pmsProductAttributeApi.list(cid, pageParam, type);
        return CommonPage.restPage(page);
    }

    @Override
    public  List attrInfo(Integer productCategoryId) {
        List list = pmsProductAttributeApi.attrInfo(productCategoryId);
        return list;
    }
}
